package com.iamteer.day18.model;

public class User {
//	private boolean isAdmin = false;
	private String username;
	private String password;
	public User(String username, String password) {
		this.username = username;
		this.password = password;
//		if ("admin".equals(username)) {
//			this.isAdmin = true;
//		}
	}
/*	public boolean isAdmin() {
		return isAdmin;
	}
	public void setAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
	}*/
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public String toString() {
		return "{账户：" + this.username + "密码：" + this.password + "}";
	}
	@Override
	public boolean equals(Object obj) {
		User user = (User) obj;
		return this.username.equals(user.username) && this.password.equals(user.password);
	}
	@Override
	public int hashCode() {
		return (this.username + this.password).hashCode();
	}
}
